/**
 * 2021-06-02 ClickHouse
 */
const {ClickHouse} = require('clickhouse');
const {database, url, port, username, password} = require('../conf/cfg').cfg.db.clickhouse;

const clickhouse = new ClickHouse({
    url: url,
    port: port,
    debug: false,
    basicAuth: {
        username: username,
        password: password
    },
    isUseGzip: false,
    config: {
        session_timeout: 60,
        output_format_json_quote_64bit_integers: 0,
        enable_http_compression: 0,
        database: database
    }
});

module.exports =clickhouse;

